﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Text;
using MonkeyShop.Admin.Models;

namespace MonkeyShop.Web
{
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    public class TestService : ITestService
    {
        public void DoWork()
        {
        }

        public string Test(int id)
        {
            return string.Format("Number is {0}", id);
        }

        public AdminUserModel Test1(int id)
        {
            return new AdminUserModel
                   {
                       Id = id,
                       Code = "", Name = "Admin", UserName = "admin", MailAddress = "quochien@gmail.com"
                   };
        }

        public List<AdminUserModel> Test2(int id)
        {
            var users = new List<AdminUserModel>
                        {
                            new AdminUserModel
                            {
                                Id = 1,
                                Code = "",
                                Name = "Admin1",
                                UserName = "admin",
                                MailAddress = "quochien@gmail.com"
                            },
                            new AdminUserModel
                            {
                                Id = 2,
                                Code = "",
                                Name = "Admin2",
                                UserName = "admin",
                                MailAddress = "quochien@gmail.com"
                            }
                        };
            return users;
        }
    }
}
